<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>增加用户</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../../../elementUI/index.css">
    <link rel="stylesheet" href="../../../css/index.css">
    <link rel="stylesheet" href="../../../component/pear/css/pear.css" />
</head>

<body>
    <div id="app" class="minWidth">
        <el-form :model="form" :rules="rules" ref="contract" inline-message="true" style="width: 100%">
            <div class="table_titel">
                <div class="titel">增加轮播图</div>
                <div class="operation">
                    <el-button type="primary" size="small" @click="add_form">新增</el-button>
                    <el-button type="danger" size="small" @click="remove_form">删除</el-button>
                </div>
            </div>
            <div style="margin-bottom: 100px;">
                <el-descriptions :column="2" border size="small" v-for="(item,index) in form.filter(item => item.Row_Status != '1')" :key="index">
                    <el-descriptions-item :label="index+1+'.轮播图名称'">
                        <el-form-item prop="Group_Rotation_Name">
                            <el-input v-model.trim="item.Group_Rotation_Name" placeholder="请输入轮播图名称"></el-input>
                        </el-form-item>
                    </el-descriptions-item>
                    <el-descriptions-item label="轮播图跳转路径(选填)">
                        <el-form-item prop="Group_Rotation_URL">
                            <el-input v-model.trim="item.Group_Rotation_URL" placeholder="请输入轮播图跳转路径"></el-input>
                        </el-form-item>
                    </el-descriptions-item>
                    <el-descriptions-item label="轮播图片">
                        <el-form-item prop="Picture_URL">
                            <div class="preview" v-show="item.Picture_URL" >
                                <el-image class="el-upload-list__item-thumbnail" style="width: 148px; height: 148px"
                                    :src="DomainIMG+item.Picture_URL" fit="contain"></el-image>
                                <span class="el-upload-list__item-actions">
                                    <span @click="handlePictureCardPreview(DomainIMG+item.Picture_URL)"><i
                                            class="el-icon-zoom-in"></i></span>
                                    <span @click="handleRemove(index)"><i class="el-icon-delete"></i></span>
                                </span>
                            </div>
                            <div @click="handleIndex(index)">
                                <el-upload v-show="!item.Picture_URL" class="upload-demo" :show-file-list="false"
                                    list-type="picture-card" action="" accept="image/*" :before-upload="upload">
                                    <i slot="default" class="el-icon-plus"></i>
                                </el-upload>
                            </div>
                        </el-form-item>
                    </el-descriptions-item>
                </el-descriptions>
            </div>
            <el-form-item class="form-operation">
                <el-button @click="window.history.back()">返回</el-button>
                <el-button type="primary" :loading="loading" @click="submitForm('contract')">提交</el-button>
            </el-form-item>
        </el-form>
    </div>
    <script type="text/javascript" src="../../../js/jquery-3.6.0.min.js"></script>
    <script type="text/javascript" src="../../../js/jquery.cookie.js"></script>
    <script type="text/javascript" src="../../../js/vue.min.js"></script>
    <script type="text/javascript" src="../../../elementUI/index.js"></script>
    <script type="text/javascript" src="../../../js/utils.js"></script>
    <script type="text/javascript" src="../../../js/compressor.js"></script>
    <script type="text/javascript" src="../../../js/ID_Validity.js"></script>
    <script type="text/javascript" src="./js/Add.js"></script>
</body>

</html>